<section id="header">
	<div class="container">
		<div class="row">
			<div class="col-md-9 col-sm-12">
				<div class="box-title-page">
					<h4>Products -  <?php echo $detail['p_name']; ?></h4>
				</div>
				<div class="row">
					<div class="col-md-12 col-sm-12">
						<?php $url = site_url('products/detail/'.slugify($detail['p_name']).'/'.$detail['p_id']); ?>
						<div style='float:right;'>
							<ul class="socmed">
								<li class="facebook"><a title="Share on Facebook" target="_blank" href="http://www.facebook.com/share.php?u=<?php echo $url;?>"><i class="fa fa-facebook"></i></a></li>
								<li class="twitter"><a title="Share on Twitter" target="_blank" href="http://twitter.com/share?text=<?php echo $detail['p_name'];?>&url=<?php echo $url;?>"><i class="fa fa-twitter"></i></a></li>
								<li class="google"><a title="Share on Google+" target="_blank" href="https://plusone.google.com/_/+1/confirm?url=<?php echo $url;?>"><i class="fa fa-google-plus"></i></a></li>
							</ul>
						</div>							
						<div style="clear:both;"></div>
						<div id="oemah-sliders-products" class="owl-carousel owl-theme-2">
						  <div class="item">
					  		<center>
					  			<img src="<?php echo site_url('products/appimage/products/thumbnail2/'.$detail['p_filename']); ?>" alt="<?php echo $detail['p_fileorig']; ?>">
					  		</center>
						  </div>
						  <?php $x=1; $count = count($images); if(isset($images)): foreach ($images as $img):  ?>
						  <div class="item">
						  		<center>
									<img height='80%' src="<?php echo site_url('products/appimage/products/thumbnail2/'.$img->pi_filename); ?>" alt="<?php echo $img->pi_origname; ?>">
						   		</center>
						   </div>
						   <?php $x++; endforeach; endif; ?>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12 col-sm-12">
						<p><?php echo $detail['p_desc']; ?></p>
					</div>
				</div>
			</div>
			<div class="col-md-3 col-sm-12">
				<div class="list-group">
				        <a href="#" class="list-group-item active">
				            <i class="fa fa-gift"></i> Categories Product
				        </a>
				        <?php if(isset($categories)): foreach ($categories as $cat): ?>
							<a href="<?php echo site_url('products/categories/'.$cat->cp_id.'/'.$cat->cp_name); ?>" class="list-group-item">
								<i class="fa fa-gift"></i> <?php echo $cat->cp_name; ?>
							</a>	
						<?php endforeach; endif; ?>
				</div>
				<div class="bs-example">
				    <div class="list-group">
				        <a href="#" class="list-group-item active">
				            <span class="glyphicon glyphicon-file"></span> Recent Article
				        </a>
				        <?php if(isset($recent_articles)): foreach ($recent_articles as $articles): ?>
							<a href="<?php echo site_url('articles/detail/'.$articles->a_title.'/'.$articles->a_id); ?>" class="list-group-item">
								<i class="fa fa-gift"></i> <?php echo $articles->a_title; ?>
							</a>	
						<?php endforeach; endif; ?>
				    </div>
				</div>
				<div class="bs-example">
				    <div class="list-group">
				        <a href="#" class="list-group-item active">
				            <span class="glyphicon glyphicon-file"></span> Recent Recipes
				        </a>
				        <?php if(isset($recent_recipes)): foreach ($recent_recipes as $recipes): ?>
							<a href="<?php echo site_url('recipes/detail/'.slugify($recipes->r_name).'/'.$recipes->r_id); ?>" class="list-group-item">
								<i class="fa fa-gift"></i> <?php echo $recipes->r_name; ?>
							</a>	
						<?php endforeach; endif; ?>
				    </div>
				</div>
				<div style='margin-top:10px;margin-bottom:10px;'>
					<?php
						if(isset($widget_home)): foreach ($widget_home as $widget): 
							if ($widget->widget_place == 1)	echo $widget->widget_source;
						endforeach; endif; 
					?>
				</div>
			</div>
		</div>
	</div>
</section>